package book;

public class BookList {
    private Book[] books = new Book[10];
    private int usedSize; //存储当前书的个数
    public BookList() {
        books[0] = new Book("Java","张三",100,"教材");
        books[1] = new Book("数据结构","李四",99,"教材");
        books[2] = new Book("数据库","王五",88,"教材");
        this.usedSize = 3;
    }
    public int getUsedSize() {
        return usedSize;
    }
    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }
    public Book getPos(int pos) {
        return books[pos];
    }
    public void setBooks(Book book,int pos) {
        books[pos] = book;
    }
}
